/**
 * 
 */
package weibo4j.examples;

import weibo4j.Users;
import weibo4j.examples.oauth2.Log;
import weibo4j.http.HttpClient;
import weibo4j.model.PostParameter;
import weibo4j.model.WeiboException;
import weibo4j.org.json.JSONArray;
import weibo4j.org.json.JSONObject;
import weibo4j.util.WeiboConfig;

/**
 * 注册
 * @author Administrator
 * 
 */
public class WeiboRegister {
	
	//验证昵称是否可用，并给予建议昵称 
	public static void verify_nickname(String access_token,String nickname){
		try {
			HttpClient client = new HttpClient();
			client.setToken(access_token);
			JSONObject result = client.get(WeiboConfig.getValue("baseURL")+"register/verify_nickname.json",new PostParameter[]{
				new PostParameter("nickname", nickname)
			}).asJSONObject();
			Log.logInfo(result.toString());
		} catch (WeiboException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String access_token = WeiboContants.access_token;
		String uid =WeiboContants.uid;
		String domain =WeiboContants.domain;
		verify_nickname(access_token,"");
	}

}
